package cn.itsource.mapper;

import cn.hutool.core.collection.CollectionUtil;
import cn.itsource.domain.org.Shop;
import cn.itsource.vo.EmplCountVO;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

import java.util.List;

public interface ShopMapper extends BaseMapper<Shop> {

    List<EmplCountVO> getEmployeeCount();

   default boolean findNameExist(String name){
       EntityWrapper entityWrapper = new EntityWrapper();
       entityWrapper.eq("name",name);
       List<Shop> list = this.selectList(entityWrapper);
        if (CollectionUtil.isEmpty(list)) return false;
        return true;
   };
}
